package frontend.components.other;

import shared.other.UserRolesDefinition;
import org.apache.wicket.markup.html.form.IChoiceRenderer;
import org.apache.wicket.model.ResourceModel;

public 	class UserRoleChoiceRender implements IChoiceRenderer<UserRolesDefinition.UserRole> {

    @Override
    public Object getDisplayValue(UserRolesDefinition.UserRole object) {
        return new ResourceModel(object.getName()).getObject();
    }

    @Override
    public String getIdValue(UserRolesDefinition.UserRole object, int index) {
        return object.getName();
    }
}
